package com.kanjian.music.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * 耳机拔出插入广播接收器
 * @author xuyanjun@kanjian.com
 */
public class HeadsetReciver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent != null) {
            int state = intent.getIntExtra("state", -1) ;
            if (state == 0) {
                // 耳机拔出 
                
            }
        }
    }

}
